Skip to main content

Overview

These Python scripts demonstrate conversion from ISIS3 cubes to PDS4 format using GDAL’s PDS4 driver. They read ISIS3 label metadata and generate configuration files for gdal_translate, enabling automated conversions with proper PDS4 metadata.
PDS4 (Planetary Data System version 4) is NASA’s current standard for archiving planetary science data. These tools bridge ISIS3 and PDS4 workflows.

Available Scripts

isis3_to_pds4_LOLA_pvl.py

Uses the PVL library to parse ISIS3 labels.

isis3_to_pds4_LOLA_pysis.py

Uses the pysis library to read ISIS3 labels via ISIS commands.
Both scripts produce identical output but use different methods for reading ISIS3 metadata. Choose based on your environment and installed dependencies.

Installation

Requirements

For pvl version:
For pysis version:
GDAL 2.2.0 or later is required for PDS4 driver support. Use recent GDAL builds for best results.

Usage

isis3_to_pds4_LOLA_pvl.py

Parameters

input.cub
string
required
Input ISIS3 cube file.
output.config
string
required
Output configuration file for gdal_translate.
-run
flag
Automatically execute gdal_translate after generating config.
-template
string
Path to custom PDS4 XML template. Defaults to $GDALDATA/pds4_template.xml.

Example Workflow

1

Generate Configuration

Create a config file from your ISIS3 cube:
Output:
2

Review Configuration

Examine the generated config file:
Example output:
3

Execute Conversion

Run the recommended gdal_translate command:

Automated Conversion

Use the -run flag to execute conversion automatically:

Custom Template

Provide a custom PDS4 XML template:

PDS4 Template Variables

The scripts extract ISIS3 metadata and map it to PDS4 template variables:
Missing Metadata: If ISIS3 labels lack required fields, warnings are printed and those variables are omitted from the config file. You may need to manually add them.

PDS4 Format Details

What is PDS4?

PDS4 is the fourth major version of NASA’s Planetary Data System standard, featuring:
  • XML Labels: Structured, validated metadata in XML format
  • Multiple Data Formats: Supports FITS, GeoTIFF, raw binary, and more
  • Context Products: Links to missions, instruments, targets, and investigators
  • Schema Validation: Ensures compliance with PDS4 standards

GDAL PDS4 Driver

The GDAL PDS4 driver supports:
  • Reading and writing PDS4 products
  • GeoTIFF-embedded image data (IMAGE_FORMAT=GEOTIFF)
  • Custom XML templates with variable substitution
  • Spatial reference system preservation
For complete GDAL PDS4 driver documentation, see: http://www.gdal.org/frmt_pds4.html

Test Data

Example test data included in the repository:
Data Source: LOLA 4 ppd DEM converted to ISIS3 from PDS: http://pds-geosciences.wustl.edu/missions/lro/lola.htm

Configuration File Format

The generated .config files contain gdal_translate options:
Use with gdal_translate --optfile config.txt to avoid lengthy command lines.

Customization

Modifying Extracted Metadata

Edit the Python scripts to extract additional ISIS3 metadata:

Custom PDS4 Templates

Create custom XML templates with placeholder variables:
The GDAL driver replaces ${VAR_*} with values from -co options.

Script Locations

Troubleshooting

GDAL Version Issues

Ensure GDAL >= 2.2.0 for PDS4 support.

Missing ISIS3 Metadata

If required fields are missing from ISIS3 labels, edit the config file manually:

Template Not Found

Set GDAL_DATA environment variable:
Or specify template explicitly:
These scripts serve as examples. Adapt them for your specific mission data and PDS4 requirements.